package org.jeecg.modules.demo.mall.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.modules.demo.mall.dto.GoodsSkuValuesDto;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: goods_sku_values
 * @Author: jeecg-boot
 * @Date:   2023-10-23
 * @Version: V1.0
 */
@Data
@TableName("goods_sku_values")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="goods_sku_values对象", description="goods_sku_values")
public class GoodsSkuValues implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private Integer id;
	/**规格名称*/
	@Excel(name = "规格名称", width = 15)
    @ApiModelProperty(value = "规格名称")
    private String skuName;
	/**规格值*/
	@Excel(name = "规格值", width = 15)
    @ApiModelProperty(value = "规格值")
    private String skuValue;
	/**默认规格 0-不默认 1-默认*/
	@Excel(name = "默认规格 0-不默认 1-默认", width = 15)
    @ApiModelProperty(value = "默认规格 0-不默认 1-默认")
    private Integer defaultSku;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;
	/**逗号分割之后的规格属性值*/
	@Excel(name = "逗号分割之后的规格属性值", width = 15)
    @ApiModelProperty(value = "逗号分割之后的规格属性值")
    private String skuSplitValue;
	/**排序*/
	@Excel(name = "排序", width = 15)
    @ApiModelProperty(value = "排序")
    private Integer sort;

    /**
     * 前端传参
     */
    @TableField(exist = false)
    private GoodsSkuValuesDto[] skuValues;
    /**
     * 新增商品时查询规格信息所需要的规格属性值转为数组
     */
    @TableField(exist = false)
    private String[] splitValue;
}
